package com.slz3.business.module.goodsManagement.gooTypeLevel1.repository;

import com.slz3.business.frame.module.Repositorys;
import com.slz3.business.module.goodsManagement.gooAttribute.domain.GooAttribute;
import com.slz3.business.module.goodsManagement.gooTypeLevel1.domain.GooTypeLevel1;

import javax.validation.constraints.NotNull;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import java.util.function.Function;
import java.util.stream.Collectors;

public class GooTypeLevel1CustomizedRepositoryImpl implements GooTypeLevel1CustomizedRepository {
    @Override
    public void test() {
        System.err.println(Repositorys.gooTypeLevel1);
        System.err.println("test: customized repository");
    }

    @Override
    public Map<UUID, GooTypeLevel1> findAllMapByUuid(){
        List<GooTypeLevel1> typeLevel1All = Repositorys.gooTypeLevel1.findAll();
        return typeLevel1All.stream().collect(Collectors.toMap(GooTypeLevel1::getUuid, c->c));
    }
}
